package work20241202_chap5oop.d_oop;

/**
 * @author zdl
 * @date 2024/12/2
 */
class ClassA {
    public ClassA() {
        System.out.println("ClassA()");//①
    }
}

class ClassB {
    public ClassB() {
        System.out.println("ClassB()");//③
    }
}

class ClassC {
    ClassA a = new ClassA();
    ClassB b;

    public ClassC() {
        System.out.println("ClassC()"); //②
        b = new ClassB();
    }
}

public class Demo7 {
    public static void main(String args[]) {
        ClassC cc = new ClassC();
    }
}
